package com.springboot.controller

import com.springboot.bean.User
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/**
 * @FileName: HelloWord.java
 * @Package: com.springboot
 *
 * @author lig134
 * @created 2017/3/3 15:59
 *
 * Copyright 2015 ziroom
 */
@RestController
class HelloWord {

    @Autowired
    User user;

    @RequestMapping("/hello/{a}")
    String hello(@PathVariable("a") String a) {
        System.out.println("进来了");
        System.out.println("userName:" + user.getUserName()+":"+user.getAge()+":"+user.getRemark()+"，城市："+user.getAddress());
        System.out.println(user.getDetailAddress().getCountry()+user.getDetailAddress().getProvince()+user.getDetailAddress().getCity());
        "this is " + user.getUserName();
    }

}
